Video encoders encode a sequence of video images (e.g., video frames) by using a variety of encoding schemes. Video encoding schemes typically encode video frames or portions of video frames (e.g., sets of pixels in the video frames) in terms of intraframes or interframes. An intraframe encoded frame or pixel set is one that is encoded independently of other frames or pixels sets in other frames. An interframe encoded frame or pixel set is one that is encoded by reference to one or more other frames or pixel sets in other frames.
When compressing video frames, some encoders implement a ‘rate controller,’ which provides a ‘bit budget’ for a video frame or a set of video frames that are to be encoded. The bit budget specifies the number of bits that have been allocated to encode the video frame or set of video frames. By efficiently allocating the bit budgets, the rate controller attempts to generate the highest quality compressed video stream in view of certain constraints (e.g., a target bit rate, etc.).
To date, a variety of single-pass and multi-pass rate controllers have been proposed. A single-pass rate controller provides bit budgets for an encoding scheme that encodes a series of video images in one pass, whereas a multi-pass rate controller provides bit budgets for an encoding scheme that encodes a series of video images in multiple passes.
Single-pass rate controllers are useful in real-time encoding situations. Multi-pass rate controllers, on the other hand, optimize the encoding for a particular bit rate based on a set of constraints. Not many rate controllers to date consider the spatial or temporal complexity of frames or pixel-sets within the frames in controlling the bit rates of their encodings. Also, most multi-pass rate controllers do not adequately search the solution space for encoding solutions that use optimal quantization parameters for frames and/or pixel sets within frames in view of a desired bit rate.
Therefore, there is a need in the art for a rate controller that uses novel techniques to consider the spatial or temporal complexity of video images and/or portions of video images, while controlling the bit rate for encoding a set of video images. There is also a need in the art for a multi-pass rate controller that adequately examines the encoding solutions to identify an encoding solution that uses an optimal set of quantization parameters for video images and/or portions of video images.